import Mock from 'mockjs'
import roles from '@/api/sys_role.json'
import resources from '@/api/sys_resource.json'
import devices from '@/api/device.json'
// let id = Mock.mock('@id');
// console.log('Mock生成ID : ',id);
const userInfo = {
    userId: 12,
    username: 'admin',
    roles:roles,
    menus: resources

}
// baseURL: process.env.VUE_APP_BASE_API
Mock.mock(/\/device\/page/,'get',{
    status:200,
    msg:'请求成功',
    data:devices
})
Mock.mock(/\/device\/id/,'get',{
    status:200,
    msg:'请求成功',
    data: null
})

Mock.mock(/\/device\/saveAndEdit/,'post',(req)=>{
    console.log('请求数据 ：', req.body)
    return {status:200, msg:'请求成功', data: null}
})


Mock.mock(/\/device/,'post',{
    status:200,
    msg:'请求成功',
    data:userInfo
})

Mock.mock(/\/device\/id/,'delete',{
    status:200,
    msg:'请求成功',
    data:userInfo
})
